package 多线程;

import static java.lang.Thread.sleep;

public class Demo4 {
    public static void main(String[] args) throws InterruptedException {
        Thread T = new Thread(() -> {
            try {
                sleep(2000);
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }
        });
        T.start();
        Thread.sleep(1000);
        System.out.println(T.isAlive());
    }
}
